<?php

namespace Home\Model;

use Think\Model;

class OrdersModel extends Model {

    protected $trueTableName = 'tb_orders';

    public function getList($where,$page) {
        $result = $this->alias('a')
                ->join("tb_orders_detail as b on a.orderId=b.orderId")
                ->where($where)
                ->field("a.orderId as order_no,paytype,realpayprice,pickuptime,b.count,ptitle,wx_time_end,b.status,gdoorid")
                ->limit(($page-1)*10,10)
                ->select();
//        return $this->getLastsql();
        return $result;
    }

}
